#/*************************************************************************
#    > File Name: examples/example_Param.py
#    > Author: Yan Wang
#    > Mail: wangyan@imnu.edu.cn
#    > Created Time: 2022年10月31日 星期一 10时13分14秒
# ************************************************************************/
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
sys.path.append('../Lib/')
from Load_Lib import * 


print("The examples in this file are:")   
ex_name={"1":"Param_ARCH_Path"
,"2":"Param_ARCH_Read_MultiFile_Name_from_File"
,"3":"Param_ARCH_File_Name"
,"4":"Param_ARCH_File"
,"5":"Param_ARCH_Control"
,"6":"Param_ARCH_Dir"
,"all":"all examples"}    #字典，所有对应函数为Lib/ARCH_Operation.py
for key in ex_name:
	print(key, ex_name[key])       #if条件语句，如果key在ex_name里面，则输出eg：1 Cal_Parton_Cut_Xection
num=input("请输入想要运行的例子：")


# 设置基本的工作路径
param_dir=Work_Param_Init(process)

if num == "1" or num == ex_name["1"] or num == "all":
	Exhibit_Function(Param_ARCH_Path,[process["name"],"of"])

if num == "2" or num == ex_name["2"] or num == "all":
	file_name=param_dir["example"]+"test_input/param_file.dat"
	Exhibit_Function(Param_ARCH_Read_MultiFile_Name_from_File,[file_name])



if num == "3" or num == ex_name["3"] or num == "all":
	file_name=param_dir["example"]+"test_input/param_file.dat"
	event_method="scan_multievent"
	event_method="seperate"
	MG_para={}
	MG_para["combined_event_folder"]=param_dir["example"]+"test_output/param_folder"
	Exhibit_Function(Param_ARCH_File_Name,[event_method, file_name,MG_para])

if num == "4" or num == ex_name["4"] or num == "all":
	file_name=param_dir["example"]+"test_input/param_file.dat"
	event_method="scan_multievent"
	event_method="seperate"
	MG_para={}
	MG_para["combined_event_folder"]=param_dir["example"]+"test_output/param_folder"
	Exhibit_Function(Param_ARCH_File,[event_method, file_name, MG_para])

if num == "5" or num == ex_name["5"] or num == "all":
	file_name=param_dir["example"]+"test_input/param_file.dat"
	MG_para={}
	MG_para["length"]=10
	MG_para["combined_event_folder"]=param_dir["example"]+"test_output/param_folder"
	MG_para["combined_event_folder_nocut"]=param_dir["example"]+"test_output/param_folder"
	Exhibit_Function(Param_ARCH_Control,[param_dir,process, file_name, MG_para])


if num == "6" or num == ex_name["6"] or num == "all":
	MG_para={}
	MG_para["length"]=10
	MG_para["combined_event_folder"]=param_dir["example"]+"test_output/param_folder"
	MG_para["combined_event_folder_nocut"]=param_dir["example"]+"test_output/param_folder"
	Exhibit_Function(Param_ARCH_Dir,[param_dir,process, MG_para])
